package com.chf.inits;

import com.chf.mods.FirstMod;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.material.MapColor;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

/**
 * 自定义方块注册
 *
 * @author niooooo
 */
public class FirstModBlocks {

    public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, FirstMod.MOD_ID);

    public static final RegistryObject<Block> FIRST_BLOCK = BLOCKS.register(
            "first_block",
            () -> new Block(BlockBehaviour.Properties.of()
                    // 小地图颜色
                    .mapColor(MapColor.STONE)
                    // 硬度和爆炸抗性
                    .strength(3.0f, 10.0f)
                    // 音效类型
                    .sound(SoundType.STONE)
                    // 需要正确工具挖掘
                    .requiresCorrectToolForDrops()));
}
